<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAdminCdjRoleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (!Schema::hasTable('admin_cdj_role')) {
            Schema::create('admin_cdj_role', function (Blueprint $table) {
                $table->increments('id');
                $table->string('name', 50);
                $table->string('remark', 255)->default('');
                $table->tinyInteger('ordid')->default(0);
                $table->tinyInteger('status')->default(1);
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin_cdj_role');
    }
}
